package com.ruoyi.hospital.service.storeInfo.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.hospital.mapper.storeInfo.PharmacyDrugNonMapper;
import com.ruoyi.hospital.domain.storeInfo.PharmacyDrugNon;
import com.ruoyi.hospital.service.storeInfo.IPharmacyDrugNonService;

/**
 * 非药品库信息Service业务层处理
 * 
 * @author wendao
 * @date 2024-08-19
 */
@Service
public class PharmacyDrugNonServiceImpl implements IPharmacyDrugNonService 
{
    @Autowired
    private PharmacyDrugNonMapper pharmacyDrugNonMapper;

    /**
     * 查询非药品库信息
     *
     * @param id 非药品库信息主键
     * @return 非药品库信息
     */
    @Override
    public PharmacyDrugNon selectPharmacyDrugNonById(Integer id)
    {
        return pharmacyDrugNonMapper.selectPharmacyDrugNonById(id);
    }

    /**
     * 查询非药品库信息列表
     *
     * @param pharmacyDrugNon 非药品库信息
     * @return 非药品库信息
     */
    @Override
    public List<PharmacyDrugNon> selectPharmacyDrugNonList(PharmacyDrugNon pharmacyDrugNon)
    {
        return pharmacyDrugNonMapper.selectPharmacyDrugNonList(pharmacyDrugNon);
    }

    /**
     * 新增非药品库信息
     *
     * @param pharmacyDrugNon 非药品库信息
     * @return 结果
     */
    @Override
    public int insertPharmacyDrugNon(PharmacyDrugNon pharmacyDrugNon)
    {
        return pharmacyDrugNonMapper.insertPharmacyDrugNon(pharmacyDrugNon);
    }

    /**
     * 修改非药品库信息
     *
     * @param pharmacyDrugNon 非药品库信息
     * @return 结果
     */
    @Override
    public int updatePharmacyDrugNon(PharmacyDrugNon pharmacyDrugNon)
    {
        return pharmacyDrugNonMapper.updatePharmacyDrugNon(pharmacyDrugNon);
    }

    /**
     * 批量删除非药品库信息
     *
     * @param ids 需要删除的非药品库信息主键
     * @return 结果
     */
    @Override
    public int deletePharmacyDrugNonByIds(Integer[] ids)
    {
        return pharmacyDrugNonMapper.deletePharmacyDrugNonByIds(ids);
    }

    /**
     * 删除非药品库信息信息
     *
     * @param id 非药品库信息主键
     * @return 结果
     */
    @Override
    public int deletePharmacyDrugNonById(Integer id)
    {
        return pharmacyDrugNonMapper.deletePharmacyDrugNonById(id);
    }

    @Override
    public PharmacyDrugNon getByPhaId(Integer phaId) {
        return pharmacyDrugNonMapper.getByPhaId(phaId);
    }
}